package top.wardyan.common.ctrl;

import com.alibaba.fastjson.JSONObject;
import com.jfinal.core.Controller;

public class BaseController extends Controller{

	private static final cn.hutool.log.Log log = cn.hutool.log.Log.get();
	
	protected <T> T getJson(Class<T> clazz) {
		String data = this.getRawData();
		T rs = null;
		if(data != null) {
			rs = JSONObject.parseObject(data, clazz);
		}
		return rs;
	}
}
